<div class="bjui-pageContent">
    <form action="{:U('save_class')}" data-callback="dialogFormCall" data-toggle="validate" data-alertmsg="false" class="dialogForm">
        <input type="hidden" name="id" value="{$va.id}"/>
        <div class="form-group">
            <label class="x100">分类名称:</label>
            <input type="text" name="name" data-rule="required" value="{$va.name}"/>
        </div>
       <!--  <div class="form-group">
            <label class="x100">手机段显示:</label>
            <input type="text" name="mobile_name" data-rule="required" value="{$va.mobile_name}"/>
            <span class="text-warning">注:由于手机屏幕有限,请尽量设置5个字以内</span>
        </div> -->
        <div class="form-group clearfix">
            <label class="x100 pull-left">分类图片、logo:</label>
            <div class="pull-left parent_img">
                <if condition="$va.logo eq null">
                <img src="__PU__/images/1584936.jpg" alt="LOGO" width="70" />
                <else/>
                <img src="{$va.logo}" alt="LOGO" width="70" />
                </if>
                <input type="hidden" name="logo" value="{$va.logo}"/>
                <span data-toggle="upload" 
                data-uploader="{:U('Index/upload')}"
                 data-file-type-exts="*.png;*.jpg"
                 data-icon="cloud-upload"
                 data-on-upload-success="upload_callback"
                 data-auto="true"
                 data-button-text="上传图片"
                ></span>
            </div>
        </div>
        <div class="form-group">
            <label class="x100">所属类型:</label>
            <select name="commend_id" id="groy-type1" data-toggle="selectpicker">
                <option value="0">--请选择--</option>
                <volist name="commend" id="vo">
                    <option value="{$vo.id}" <if condition="$va['commend_id'] eq $vo['id']">selected</if>>{$vo.name}</option>
                </volist>
            </select>
        </div>
        <div class="form-group">
            <label class="x100">上级分类:</label>
            <select name="parent_id" id="groy-type1" data-toggle="selectpicker" data-nextselect="#groy-type2" data-refurl="{:U('Index/getmsg')}?v={value}">
                <option value="0">顶级分类</option>
                <volist name="res" id="vo">
                    <option value="{$vo.id}" <if condition="$va['parent_id'] eq $vo['id']">selected</if>>{$vo.name}</option>
                </volist>
            </select>
            <select name="pre_parent_id" id="groy-type2" data-toggle="selectpicker">
                <if condition="$va.leve eq '3'">
                <option value="{$va.pre_parent_id}">{$va.parent_name}</option>
                <else/>
                <option value="0">--请选择--</option>
                </if>
            </select>
        </div>
        <!-- <div class="form-group">
            <label class="x100">首页是否显示:</label>
             <input type="radio" name="visibility" value="1" id="groy-rec1" data-toggle="icheck" data-label="是" <if condition="$va.visibility neq '0'"> checked </if> />
             <input type="radio" name="visibility" value="0" id="groy-rec2" data-toggle="icheck" data-label="否"  <if condition="$va.visibility eq '0'"> checked </if> />
        </div> -->
        <div class="form-group">
            <label class="x100">状态:</label>
             <input type="radio" name="status" value="0" id="groy-status1" data-toggle="icheck" data-label="显示"  <if condition="$va.status neq '1'">checked </if> />
             <input type="radio" name="status" value="1" id="groy-status2" data-toggle="icheck" data-label="不显示"  <if condition="$va.status eq '1'">checked </if> />
        </div>
        <div class="form-group">
            <label class="x100">权重:</label>
            <input type="text" name="sort" value="{$va.sort}" data-toggle="spinner" data-min="0" data-step="1" data-rule="integer" class="w100"  />
            <span class="text-warning">权重越大,越靠前显示</span>
        </div>
    </form>
</div>
<script>
    $(function () {
//        $('.groy-type1').
    });
</script>
<include file="Common/footer" ftype="save" />